package dto

type AdminRegisterRequest struct {
	Username string `json:"username" binding:"required,min=3,max=64"`
	Password string `json:"password" binding:"required,min=6,max=64"`
	Email    string `json:"email" binding:"required,email"`
}

type AdminLoginRequest struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type AdminLoginMeta struct {
	UserAgent string `json:"user_agent"`
	Referer   string `json:"referer"`
	IP        string `json:"ip"`
}

type AdminProfile struct {
	ID                uint        `json:"id"`
	Username          string      `json:"username"`
	Nickname          string      `json:"nickname"`
	Avatar            string      `json:"avatar"`
	Email             string      `json:"email"`
	Status            int8        `json:"status"`
	IsSuper           bool        `json:"is_super"`
	Roles             []AdminRole `json:"roles"`
	PermissionsApi    []string    `json:"permissions_api"`
	PermissionsMenu   []string    `json:"permissions_menu"`
	PermissionsButton []string    `json:"permissions_button"`
}

type AdminRole struct {
	Code   string `json:"code"`
	Name   string `json:"name"`
	Status int8   `json:"status"`
}

type AdminTokenInfo struct {
	AdminID   uint   `json:"admin_id"`
	Token     string `json:"token"`
	ExpiredAt int64  `json:"expired_at"`
}
